package com.thssh.ui.lsn05;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.thssh.ui.R;
import com.thssh.ui.base.BaseActivity;
import com.thssh.ui.lsn05.activity.DemoActivity;

public class Lsn05Activity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getSupportActionBar().setTitle(R.string.des_lsn05);
        setContentView(R.layout.activity_lsn05);
    }

    private void startDemoActivity(int extra){
        Intent intent = new Intent(this, DemoActivity.class);
        intent.putExtra(DemoActivity.EXTRA_VIEW, extra);
        startActivity(intent);
    }

    public void xfermode1Click(View view) {
        startDemoActivity(DemoActivity.VIEW_X_FER_MODE);
    }

    public void xfermode2Click(View view) {
        startDemoActivity(DemoActivity.VIEW_BITMAP_X_FER_MODE);
    }

    public void demo1Click(View view) {
        startDemoActivity(DemoActivity.VIEW_X_FER_MODE_CIRCLE);
    }

    public void demo2Click(View view) {
        startDemoActivity(DemoActivity.VIEW_ERASER);
    }

    public void demo3Click(View view) {
        startDemoActivity(DemoActivity.VIEW_SCRATCH);
    }

    public void demo4Click(View view) {
        startDemoActivity(DemoActivity.VIEW_LAYER);
    }
}
